package com.zhongke.cotrun.service;

import com.github.pagehelper.PageInfo;
import com.zhongke.cotrun.model.exception.MyException;
import com.zhongke.cotrun.model.pojo.ServiceRelease;
import com.zhongke.cotrun.model.pojo.ServiceReleaseVo;

import javax.servlet.http.HttpSession;


public interface ServiceReleaseService {

    /**
     * 服务发布
     *
     * @param serviceRelease
     * @param session
     * @return
     */
    public Boolean addServiceRelease(ServiceRelease serviceRelease, HttpSession session) throws MyException;

    /**
     * 查询服务列表
     *
     * @param serviceRelease
     * @param pageNum
     * @param pageSize
     * @return
     */
    public PageInfo selectServiceReleaseBycondition(ServiceRelease serviceRelease, Integer pageNum, Integer pageSize);

    /**
     * 根据id查询
     *
     * @param id
     * @return
     */
    public ServiceReleaseVo selectReleaseById(Integer id) throws MyException;


    /**
     * 修改服务
     *
     * @param serviceRelease
     * @return
     */
    public boolean updateServiceRelease(ServiceRelease serviceRelease);

    /**
     * 删除服务
     * @param id
     * @param statue
     * @return
     */
    public boolean delectSerciceRelease(Integer id, Integer statue);
}
